class OrganCategoryPositionStandardsController < InheritedResources::Base
  respond_to :json

  def query_position_standard
    respond_with OrganCategoryPositionStandardJsonSerializer.index_json OrganCategoryPositionStandard.where(organization_category: params[:category])
  end

  def create
    add_organ_position_standard = AddOrganPositionStandard.run permitted_params
    render CommandJsonSerializer.as_json add_organ_position_standard
  end

  private

  def permitted_params
    params.permit(:position_id, :organization_category, :id)
  end
end